package org.zhuyx.ch01.shili.entity;

import java.io.Serializable;

/**
 * @author 茜茜
 * @date 2024-12-05 15:15
 */
public class Baby implements Serializable {
    private String name;
    private String gender;
    private Woman mother;


    public Baby() {
    }

    public Baby(String gender) {
    }

    public Baby(String gender, Woman mother) {
        this.gender = gender;
        this.mother = mother;
    }

    public String getName() {
        return name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Woman getMother() {
        return mother;
    }

    public void setMother(Woman mather) {
        this.mother = mather;
    }



    public void introduce() {
        System.out.println("我是一个" + getGender() + "宝宝，我的妈妈是：" + this.getMother().getName());
        if(name==null){
            System.out.println("我还没有取名~");
        }else {
            System.out.println("我叫：" + this.getName());
        }
    }

}
